package main

import (
	"fmt"
	"reflect"
)

func reflectModify(b interface{}) {
	rVal := reflect.ValueOf(b)
	rVal.Elem().SetInt(15)

}
func reflectTest(i interface{}) {
	refValue := reflect.ValueOf(i)
	fmt.Printf("reflect.value=%v\n", refValue)
	fmt.Printf("对应的kind为%v\n", refValue.Kind())
	fmt.Printf("对应的type为%v\n", refValue.Type())

	refValue.Interface()
	num := i.(float64)
	fmt.Println(num)
}
func main() {
	/*var num int = 10
	reflectModify(&num)
	fmt.Println(num)*/
	var n float64 = 15.6
	reflectTest(n)
}
